﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace ASoft.Led
{
    [DataContract]
    public class LedCfg
    {
        [DataMember]
        public int PhecX { get; set; }

        [DataMember]
        public int PhecY { get; set; }

        [DataMember]
        public int PhecW { get; set; }

        [DataMember]
        public int PhecH { get; set; }

        [DataMember]
        PhecItem _PhecItem1;
        public PhecItem PhecItem1
        {
            get
            {
                if (_PhecItem1 == null)
                    _PhecItem1 = new PhecItem();
                return _PhecItem1;
            }
        }

        [DataMember]
        PhecItem _PhecItem2;
        public PhecItem PhecItem2
        {
            get
            {
                if (_PhecItem2 == null)
                    _PhecItem2 = new PhecItem();
                return _PhecItem2;
            }
        }

        [DataMember]
        PhecItem _PhecItem3;
        public PhecItem PhecItem3
        {
            get
            {
                if (_PhecItem3 == null)
                    _PhecItem3 = new PhecItem();
                return _PhecItem3;
            }
        }

        [DataMember]
        PhecItem _PhecItem4;
        public PhecItem PhecItem4
        {
            get
            {
                if (_PhecItem4 == null)
                    _PhecItem4 = new PhecItem();
                return _PhecItem4;
            }
        }

        [DataMember]
        PhecItem _PhecItem5;
        public PhecItem PhecItem5
        {
            get
            {
                if (_PhecItem5 == null)
                    _PhecItem5 = new PhecItem();
                return _PhecItem5;
            }
        }

        [DataMember]
        PhecItem _PhecItem6;
        public PhecItem PhecItem6
        {
            get
            {
                if (_PhecItem6 == null)
                    _PhecItem6 = new PhecItem();
                return _PhecItem6;
            }
        }

        [DataMember]
        PhecItem _PhecItem7;
        public PhecItem PhecItem7
        {
            get
            {
                if (_PhecItem7 == null)
                    _PhecItem7 = new PhecItem();
                return _PhecItem7;
            }
        }

        [DataMember]
        public int RX { get; set; }

        [DataMember]
        public int RY { get; set; }

        [DataMember]
        public int RW { get; set; }

        [DataMember]
        public int RH { get; set; }

        [DataMember]
        RItem _R1;
        public RItem R1
        {
            get
            {
                if (_R1 == null)
                    _R1 = new RItem();
                return _R1;
            }
        }

        [DataMember]
        RItem _R2;
        public RItem R2
        {
            get
            {
                if (_R2 == null)
                    _R2 = new RItem();
                return _R2;
            }
        }
        [DataMember]
        RItem _R3;
        public RItem R3
        {
            get
            {
                if (_R3 == null)
                    _R3 = new RItem();
                return _R3;
            }
        }
        [DataMember]
        WeatherItem _Weather;
        public WeatherItem Weather
        {
            get
            {
                if (_Weather == null)
                    _Weather = new WeatherItem();
                return _Weather;
            }
        }

        [DataMember]
        public int WeatherX { get; set; }

        [DataMember]
        public int WeatherY { get; set; }

        [DataMember]
        public int WeatherW { get; set; }

        [DataMember]
        public int WeatherH { get; set; }

        [DataMember]
        public int SmileX { get; set; }

        [DataMember]
        public int SmileY { get; set; }

        [DataMember]
        public int SmileW { get; set; }

        [DataMember]
        public int SmileH { get; set; }
    }

    [DataContract]
    public class WeatherItem
    {
        [DataMember]
        public int Cell1X { get; set; }
        [DataMember]
        public int Cell1Y { get; set; }

        [DataMember]
        public int Cell2X { get; set; }
        [DataMember]
        public int Cell2Y { get; set; }

        [DataMember]
        public int Cell3X { get; set; }
        [DataMember]
        public int Cell3Y { get; set; }

        [DataMember]
        public int Cell4X { get; set; }
        [DataMember]
        public int Cell4Y { get; set; }

        [DataMember]
        public int Cell5X { get; set; }
        [DataMember]
        public int Cell5Y { get; set; }

    }

    [DataContract]
    public class RItem
    {
        [DataMember]
        public int Cell0X { get; set; }
        [DataMember]
        public int Cell0Y { get; set; }

        [DataMember]
        public int Cell1X { get; set; }
        [DataMember]
        public int Cell1Y { get; set; }

        [DataMember]
        public int Cell2X { get; set; }
        [DataMember]
        public int Cell2Y { get; set; }

        [DataMember]
        public int Cell3X { get; set; }
        [DataMember]
        public int Cell3Y { get; set; }

        [DataMember]
        public int Cell4X { get; set; }
        [DataMember]
        public int Cell4Y { get; set; }

        [DataMember]
        public int Cell5X { get; set; }
        [DataMember]
        public int Cell5Y { get; set; }

        [DataMember]
        public int Cell6X { get; set; }
        [DataMember]
        public int Cell6Y { get; set; }

        [DataMember]
        public int Cell7X { get; set; }
        [DataMember]
        public int Cell7Y { get; set; }
    }
    [DataContract]
    public class PhecItem
    {
        [DataMember]
        public int NameX { get; set; }
        [DataMember]
        public int NameY { get; set; }

        [DataMember]
        public int PhX { get; set; }
        [DataMember]
        public int PhY { get; set; }

        [DataMember]
        public int EcX { get; set; }
        [DataMember]
        public int EcY { get; set; }
    }
}
